package dujiu.luogu.circulation;

import java.util.Scanner;

public class P1089 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] arr = new int[12];
        int total = 0;
        for (int i = 0; i < 12; i++) {
            total += 300;
            arr[i] = scanner.nextInt();
            if (arr[i] > total){
                System.out.println(-(i+1));
            }else {
                total -= arr[i];
            }
        }
    }
}
